﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="MinecraftLauncher.MainWindow"
        Title="MainWindow" Height="350" Width="525" mc:Ignorable="d" Loaded="testBlock_Loaded">
    <Window.Resources>
        <DataTemplate x:Key="VersionItemContainer">
            <Grid d:DesignWidth="220" d:DesignHeight="44"/>
        </DataTemplate>
        <DataTemplate x:Key="VersionListItem">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="60" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <Border Margin="5" BorderBrush="Black" BorderThickness="1">
                    <Image x:Name="icon" Width="50" Height="50" Source="Assets/Images/Grass.png" />
                </Border>
                <StackPanel Grid.Column="1" Margin="5">
                    <TextBlock x:Name="versionName" Text="{Binding Path=Name, FallbackValue=VersionName}" />
                    <TextBlock x:Name="description" Text="{Binding Path=Description, FallbackValue=Description}" Padding="3,0,0,0"/>
                </StackPanel>
            </Grid>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="0.85*"/>
            <RowDefinition Height="0.15*"/>
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <ListBox x:Name="fileList" Margin="8" ItemsSource="{Binding}" ItemTemplate="{DynamicResource VersionListItem}" SelectionChanged="fileList_SelectionChanged" />

        <CheckBox x:Name="extraOpts" Margin="8,8,0,8" Content="Launch w/ Extra Options" Grid.Row="1" HorizontalAlignment="Left" Width="152" VerticalAlignment="Center" />
        <Button Margin="0,8,8,8" Width="129" Content="Launch" HorizontalAlignment="Right" Grid.Row="1" Name="launchGame" Click="launchGame_Click" IsEnabled="False" />


    </Grid>
</Window>
